import React, { Component } from 'react';
import {
    StyleSheet,
    Text,
    View,
    Image,
    TouchableOpacity ,
    Dimensions
} from 'react-native'
import Icon from 'react-native-vector-icons/FontAwesome';

import WXStyle from '../utils/style/wxstyle';
import Style from '../utils/style/style'
export default class DesktopView extends Component {
    constructor(props) {
        super(props)
    }
    render() {
        const { workList } = this.props
        return (
            
            <View style={[Style.flex1, {width:Style.width}, styles.wrapper]}>
                <View style={[Style.fww, Style.dfr, Style.widthFull, styles.wrapper]}>
                    {workList.map((item, index) => (
                        item.show?
                        <TouchableOpacity  key={index}  style={[WXStyle.weuiGrid, styles.item]} onPress={ item.click}>
                            <View style={[Style.aic,Style.jsc]}>
                                <View style={Style.center}>
                                    <Icon name={item.iconName} size={28} color={item.tintColor} />
                                </View>
                                <Text >
                                    {item.name}
                                </Text>
                            </View>
                        </TouchableOpacity>:null
                    ))}
                </View>
            </View>
        )
    }
}

const styles = StyleSheet.create({
    wrapper: {
        height: Style.ViewHeight - Style.bannerHeight,
        backgroundColor:'#fff'
    },
    item: {
        borderColor: '#d9d9d9',
        borderRightWidth: 1,
        borderBottomWidth: 1,
        borderStyle: 'solid',
    }

})